import 'dart:math';

import 'package:demo/utils/utils.dart';
import 'package:flutter/material.dart';

import '../../widget/app_bar.dart';
import '../../widget/state_layout.dart';

class NotFoundWidget extends StatelessWidget {

  List<String> _list = [
    Utils.getImgPath("demo/bg_mood_1"),
    Utils.getImgPath("demo/bg_mood_2"),
    Utils.getImgPath("demo/bg_mood_3"),
    Utils.getImgPath("demo/bg_mood_4"),
    Utils.getImgPath("demo/bg_mood_5"),
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: MyAppBar(
        centerTitle: '404',
        elevation: 1,
      ),
      body: StateLayout(
        type: StateType.logic,
        img: _list[Random().nextInt(_list.length)],
        hintText: '页面不存在',
      ),
    );
  }
}
